package com.cll.learn.control.demo04;

import java.util.concurrent.Phaser;

/**
 * 描述信息:
 *
 * @author CLL
 * @version 1.0
 * @date 2021/5/15 18:02
 */
public class PhaserTest {

    public static void main(String[] args) {
        Phaser phaser = new Phaser(10);
        System.out.println(phaser.getPhase());
        for (int i = 0; i < 10; i++) {
            new Thread(new AwaitThread(phaser)).start();
        }

        phaser.awaitAdvance(0);
        System.out.println("===>>> 执行完成");
    }
}
